﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Dept_Role_Edit.aspx.cs" Inherits="SYS_POPEDOM_Dept_Role_Edit" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../JavaScript/Common.js"></script>
    <link href="../css/PageStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function SaveDeptRole() {
            Ext.net.DirectMethods.SaveDeptRole({
                success: function(result) {
                    parent.TreePanel1.getSelectionModel().getSelectedNode().reload();
                    Closepopwin();
                },
                failure: function(errorMsg) {
                    Ext.Msg.alert('Failure', errorMsg);
                }
            });
        }

        function Cancel() {
            Closepopwin();
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" AjaxViewStateMode="Enabled" />
        <ext:Store ID="Store1" runat="server" AutoLoad="true">
            <Reader>
                <ext:JsonReader IDProperty="ROLE_ID" > <%--ReaderID="ROLE_ID"--%>
                    <Fields>
                        <ext:RecordField Name="ROLE_ID">
                        </ext:RecordField>
                        <ext:RecordField Name="ROLE_NAME">
                        </ext:RecordField>
                        <ext:RecordField Name="NOTES">
                        </ext:RecordField>
                    </Fields>
                </ext:JsonReader>
            </Reader>
            <SortInfo Direction="ASC"></SortInfo>
        </ext:Store>
        <ext:Panel ID="Panel1" runat="server" Height="350" AutoWidth="true" ButtonAlign="Center" BodyBorder="false">
            <Items>
                <ext:FitLayout ID="FitLayout1" runat="server"><Items>
                    <ext:Panel ID="Panel2" runat="server" >
                        <Items>
                            <ext:GridPanel ID="GridPanel1" runat="server" StoreID="Store1" Border="false" Height="300"
                            AutoScroll="true" StripeRows="true">
                                <ColumnModel>
                                    <Columns>
                                        <ext:RowNumbererColumn Header="序号" Width="35">
                                        </ext:RowNumbererColumn>
                                        <ext:Column Header="" DataIndex="ROLE_ID" Width="150" Hidden="true">
                                        </ext:Column>
                                        <ext:Column Header="角色名称" DataIndex="ROLE_NAME" Width="150">
                                        </ext:Column>
                                        <ext:Column Header="备注" DataIndex="NOTES" Width="300">
                                        </ext:Column>
                                    </Columns>
                                </ColumnModel>
                                <SelectionModel>
                                    <ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" ColumnPosition="1"
                                        AllowDeselect="true">
                                    </ext:CheckboxSelectionModel>
                                </SelectionModel>
                            </ext:GridPanel>
                        </Items>
                    </ext:Panel></Items>
                </ext:FitLayout>
            </Items>
            <Buttons>
                <ext:Button ID="extbtn_Add" runat="server" Text="确定" Icon="Add">
                    <Listeners>
                        <Click Fn="SaveDeptRole" />
                    </Listeners>
                </ext:Button>
                <ext:Button ID="extbtn_Cancle" runat="server" Text="取消" Icon="Cancel">
                    <Listeners>
                        <Click Fn="Cancel" />
                    </Listeners>
                </ext:Button>
            </Buttons>
        </ext:Panel>
    </div>
    </form>
</body>
</html>
